{{- if .Site.Params.algolia }}
{{- $options := dict
    "targetPath" "assets/algolia/bundle.min.js"
    "minify" hugo.IsProduction
    "params" .Site.Params
-}}
{{- $script := resources.Get "algolia/js/index.ts" | js.Build $options | fingerprint -}}
<script data-precache defer src="{{ $script.RelPermalink }}" crossorigin="anonymous"></script>
<!-- <script data-precache defer src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}" crossorigin="anonymous"></script> -->
{{- end -}}
